namespace ZR.Model.Models.ProductionControl
{
    /// <summary>
    /// 订单信息表
    /// </summary>
    [SugarTable("order_plan")]
    public class OrderPlan : BaseEntity
    {
        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 产线代号
        /// </summary>
        [SugarColumn(ColumnName = "line_code")]
        public string LineCode { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        [SugarColumn(ColumnName = "order_type")]
        public string OrderType { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        [SugarColumn(ColumnName = "order_code")]
        public string OrderCode { get; set; }

        /// <summary>
        /// 订单物料
        /// </summary>
        [SugarColumn(ColumnName = "order_material")]
        public string OrderMaterial { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [SugarColumn(ColumnName = "product_name")]
        public string ProductName { get; set; }

        /// <summary>
        /// 产品型号
        /// </summary>
        [SugarColumn(ColumnName = "product_type")]
        public string ProductType { get; set; }

        /// <summary>
        /// 上线日期
        /// </summary>
        [SugarColumn(ColumnName = "online_date")]
        public DateTime? OnlineDate { get; set; }

        /// <summary>
        /// 下线日期
        /// </summary>
        [SugarColumn(ColumnName = "offline_date")]
        public DateTime? OfflineDate { get; set; }

        /// <summary>
        /// 订单排序
        /// </summary>
        [SugarColumn(ColumnName = "order_rank")]
        public int? OrderRank { get; set; }

        /// <summary>
        /// 订单总数量
        /// </summary>
        [SugarColumn(ColumnName = "order_total_count")]
        public int? OrderTotalCount { get; set; }

        /// <summary>
        /// 订单上线数量
        /// </summary>
        [SugarColumn(ColumnName = "order_online_count")]
        public int? OrderOnlineCount { get; set; }

        /// <summary>
        /// 订单下线数量
        /// </summary>
        [SugarColumn(ColumnName = "order_offline_count")]
        public int? OrderOfflineCount { get; set; }

        /// <summary>
        /// 订单状态（0：初始化，1：激活，2：关闭，3：暂停，4：完成）
        /// </summary>
        [SugarColumn(ColumnName = "order_state")]
        public int? OrderState { get; set; }

        [SugarColumn(ColumnName = "remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "creation_time")]
        public DateTime? CreationTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "creator_name")]
        public string CreatorName { get; set; }

        /// <summary>
        /// MES上传标志位（0：未上传，1：已上传）
        /// </summary>
        [SugarColumn(ColumnName = "mes_pushed")]
        public int? MesPushed { get; set; }
    }
}